﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="ContextMenu.aspx.cs" Inherits="ContextMenu" %>

<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Assembly="jQueryNET" Namespace="jQueryNET" TagPrefix="cc2" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
	<title></title>

	<script type="text/javascript">
		var contextMenu = null;
		
		function pageLoad() {
			$(document).bind('contextmenu', onContextmenu);
			contextMenu = $find('ContextMenu1');
			contextMenu.add_itemClick(test);
		}
		
		function onContextmenu(event) {
			contextMenu.show(event.pageX, event.pageY);
		}

		function test(sender, item) {
			alert(item.Text);
		}
	</script>

</head>
<body>
	<form id="form1" runat="server">
	<div>
		<cc1:ToolkitScriptManager ID="ToolkitScriptManager1" runat="server" />
		<cc2:ContextMenu ID="ContextMenu1" runat="server"></cc2:ContextMenu>
	</div>
	</form>
</body>
</html>
